package reflect;

import java.lang.reflect.Method;
import java.util.Scanner;

public class ReflectDemo1 {
    public static void main(String[] args) {

        Class cla = String.class;
        String name = cla.getName();
        System.out.println(name);

        Package p = cla.getPackage();
        System.out.println("包名：" + p.getName());

        Method[] methods = cla.getMethods();
        for (Method method :
                methods) {
            System.out.println(method.getName());
        }

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个类名：");


    }
}